package ${basePackage}.marker.cli.command;

import cn.hutool.core.io.FileUtil;
import picocli.CommandLine;

import java.io.File;
import java.util.List;

//查看列文件列表
@CommandLine.Command(name="list",description = "查看文件列表",mixinStandardHelpOptions = true)
public class ListCommand implements Runnable {

    @Override
    public void run() {
        String projectPath = System.getProperty("user.dir");//获取工程根目录
        File parentFile = new File(projectPath).getParentFile();
        //输入路径
        String inputPath = "${fileConfig.inputRootPath}";
        List<File> files = FileUtil.loopFiles(inputPath);
        for(File file:files) {
            System.out.println(file);
        }
    }
}
